package com.github.shiqiyue.blog.markdown.repository;

import org.springframework.data.jpa.repository.JpaRepository;

import com.github.shiqiyue.blog.markdown.entity.User;

/***
 * user repository
 * 
 * @author wwy
 *
 */
public interface UserRepository extends JpaRepository<User, Long> {
	
	/***
	 * find by username
	 * 
	 * @param username
	 * @return
	 */
	public User findByUsername(String username);
	
	/***
	 * count by username
	 * 
	 * @param username
	 * @return
	 */
	public Long countByUsername(String username);
	
	/***
	 * count by email
	 * 
	 * @param email
	 * @return
	 */
	public Long countByEmail(String email);
}
